<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('在制品按卡号工步时长统计列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
<!--                            <li>-->
<!--                                <label>日期时间标识：</label>-->
<!--                                <input type="text" class="time-input" placeholder="请选择日期时间标识" name="timeFlag"/>-->
<!--                            </li>-->
                            <li>
                                <label>卡号：</label>
                                <input type="text" name="lotId"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="report:wiplotsteptimesta:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <!-- table-bordered -->
            <div class="col-sm-12 select-table " style="white-space: nowrap;">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">

        var prefix = ctx + "report/wiplotsteptimesta";

        var columns = [
            [
                {
                    title : '',
                    align : 'center',
                    colspan : 6
                },
                {
                    title : '标准计划',
                    align : 'center',
                    colspan : 2
                },
                {
                    title : '实际',
                    align : 'center',
                    colspan : 2
                },
                {
                    title : '标准计划',
                    align : 'center',
                    colspan : 2
                },
                {
                    title : '实际',
                    align : 'center',
                    colspan : 3
                },
                {
                    title : '',
                    align : 'center',
                    colspan : 1
                }
            ],
            [
                {
                    field: 'NO',
                    align : 'center',
                    title: 'NO',
                    formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }
                },
                {
                    field: 'lotId',
                    align : 'center',
                    title: '卡号'
                },
                {
                    field: 'partName',
                    align : 'center',
                    title: '产品名称'
                },
                {
                    field: 'mainQty',
                    align : 'center',
                    title: '片数'
                },
                {
                    field: 'stepName',
                    align : 'center',
                    title: '工步名称'
                },
                {
                    field: 'stageDsc',
                    align : 'center',
                    title: '工段描述'
                },
                {
                    field: 'standardPlanStepAll',
                    align : 'center',
                    title: '总工步'
                },
                {
                    field: 'standardPlanDonedStep',
                    align : 'center',
                    title: '已完成工步'
                },
                {
                    field: 'actualDonedStep',
                    align : 'center',
                    title: '已完成工步'
                },
                {
                    field: 'actualLeavedStep',
                    align : 'center',
                    title: '剩余工步'
                },
                {
                    field: 'spStepTime',
                    align : 'center',
                    title: '总工步时长(分钟)'
                },
                {
                    field: 'spDonedStepTime',
                    align : 'center',
                    title: '已完成工步时长(分钟)'
                },
                {
                    field: 'actualDonedRunTime',
                    align : 'center',
                    title: '已完成run工步时长(分钟)'
                },
                {
                    field: 'actualDonedWaitTime',
                    align : 'center',
                    title: '已完成wait工步时长(分钟)'
                },
                {
                    field: 'actualLeavedStepTime',
                    align : 'center',
                    title: '剩余工步时长(分钟)'
                },
                {
                    field: 'holdTimes',
                    align : 'center',
                    title: 'hold次数'
                }
            ]
        ];
        var options = {
            url: prefix + "/list",
            exportUrl: prefix + "/export",
            modalName: "在制品按卡号工步时长统计",
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            sidePagination: "client",
            columns: columns
        };

        $(function() {
            $.table.init(options);
        });
    </script>
</body>
</html>